﻿namespace TSharp.Core.Repository
{
    /// <summary>
    /// Generic repository interface (DDD) for reading and writing domain entities to a storage.
    /// </summary>
    /// <typeparam name="TEntity">Domain entity.</typeparam>
    public interface IGenericRepository<TEntity> : IReadonlyRepository<TEntity>
        where TEntity : class
    {
        /// <summary>
        /// Inserts entity to the storage.
        /// </summary>
        void Insert(TEntity entity);

        /// <summary>
        /// Updates entity in the storage.
        /// </summary>
        void Update(TEntity entity);

        /// <summary>
        /// Deletes entity in the storage.
        /// </summary>
        void Delete(TEntity entity);


    }
}
